﻿<%@ Page Language="C#" AutoEventWireup="true" ValidateRequest="false" CodeBehind="addExceptType.aspx.cs"
    Inherits="WorkOrder.addExceptType" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="../css/site2.css" type="text/css" rel="STYLESHEET" />
    <link rel="stylesheet" type="text/css" href="../css/subModal.css" />
    <script language="javascript" type="text/javascript">        //加在head中，PNG无灰色背景
        var tmp = window.navigator.userAgent.toLowerCase().indexOf("MSIE");
        //加在head中，PNG无灰色背景
        function correctPNG() {
            for (var i = 0; i < document.images.length; i++) {
                var img = document.images[i];
                var imgName = img.src.toUpperCase();
                if (imgName.substring(imgName.length - 3, imgName.length) == "PNG") {
                    var imgID = (img.id) ? "id='" + img.id + "' " : "";
                    var imgClass = (img.className) ? "class='" + img.className + "' " : "";
                    var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' ";
                    var imgStyle = "display:inline-block;" + img.style.cssText;
                    if (img.align == "left") imgStyle = "float:left;" + imgStyle;
                    if (img.align == "right") imgStyle = "float:right;" + imgStyle;
                    if (tmp >= 1) {
                        if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle;
                    }
                    else {
                        if (img.parentNode.href) imgStyle = "cursor:hand;" + imgStyle;
                    }
                    var strNewHTML = "<span " + imgID + imgClass + imgTitle + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
       + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader" + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>";
                    img.outerHTML = strNewHTML;

                }
            }
        }

        if (window.addEventListener) {
            window.addEventListener('DOMContentLoaded', correctPNG, false);   //firefox
            window.addEventListener('load', correctPNG, false);
        } else if (window.attachEvent) {
            window.attachEvent('onload', correctPNG);  //IE
        }
    </script>
    <script type="text/javascript">
        String.prototype.trim = function () {
            // 用正则表达式将前后空格，用空字符串替代。
            return this.replace(/(^\s*)|(\s*$)/g, "");
        }
        function saveValidate() {
            var a = document.getElementById("txtExceptType");
            if (a.value.trim() == "")
                alert("请输入工单问题类型名称！");
            else {
                document.getElementById("form1").action = "addExceptType.aspx?a=0";
                document.getElementById("form1").submit();
            }
        }

        function MyCL() {
            window.returnVal = document.getElementById("lblMsg").innerHTML;
            window.top.frames.mainFrame.hidePopWin(true);
        }
    </script>
</head>
<body style="background-color: #f7f7f7; font-size: 12px; padding-top: 0px; padding-left: 0px;
    margin-top: 0px;">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
        <tr>
            <td>
                <div style="border: 0px solid #008000;">
                    <table width="100%" border="0">
                        <tbody>
                            <tr>
                                <td>
                                    <form action="addExceptType.aspx" id="form1" method="post" runat="server">
                                    <div>
                                        <table border="0" style="width: 100%">
                                            <tr>
                                                <td colspan="2" style="height: 24px">
                                                    —————— 新增 / 修改&nbsp;&nbsp;工单问题类型信息 ——————
                                                </td>
                                            </tr>
                                            <tr>
                                                <td colspan="2" style="height: 16px">
                                                    &nbsp;
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="width: 105px">
                                                    名称：
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="txtExceptType" runat="server" CssClass="TextBox" Width="300px"></asp:TextBox>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                </td>
                                                <td>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    备注：
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="txtRemark" runat="server" CssClass="TextBox" Width="300px"></asp:TextBox>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                </td>
                                                <td>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                </td>
                                                <td>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="height: 24px;">
                                                </td>
                                                <td style="height: 24px;">
                                                    <input id="btnSave" type="button" value="保  存" class="Button" onclick="saveValidate();" />
                                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:Label ID="lblMsg" runat="server" ForeColor="DarkGreen"></asp:Label>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="height: 10px">
                                                </td>
                                                <td style="height: 10px">
                                                </td>
                                            </tr>
                                        </table>
                                        <input type="hidden" id="hidExceptType" value="" runat="server" />
                                        <input type="hidden" id="hidRemark" runat="server" />
                                        <input type="hidden" id="hidExceptTypeID" runat="server" />
                                    </div>
                                    </form>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </td>
        </tr>
    </table>
</body>
</html>
